import { defineStore } from 'pinia';
import { ref } from 'vue';

interface GeneralSettings {
  systemName: string;
  logo: string;
  description: string;
}

export const useGeneralStore = defineStore('general', () => {
  const settings = ref<GeneralSettings>({
    systemName: '',
    logo: '',
    description: ''
  });

  const updateSettings = async (newSettings: GeneralSettings) => {
    // TODO: 实现与后端的通信
    settings.value = newSettings;
  };

  const fetchSettings = async () => {
    // TODO: 实现从后端获取设置
    return settings.value;
  };

  return {
    settings,
    updateSettings,
    fetchSettings
  };
}); 